<!-- MyComponent.vue -->
<template>
  <div>
    <h1>{{ responseData }}</h1>
  </div>
</template>

<script>
import axios from 'axios';

export default {
  data() {
    return {
      responseData: ''
    };
  },
  mounted() {
    this.fetchData();
  },
  methods: {
    fetchData() {
      axios.get('http://127.0.0.1:5000')
        .then(response => {
          this.responseData = response.data;
        })
        .catch(error => {
          console.error('Error fetching data:', error);
        });
    }
  }
};
</script>
